import Vue from 'vue'
// import Home from '@/views/asyncComponents'
import Router from 'vue-router'
 
Vue.use(Router)
 
export const constantRouterMap = [{
    path: '/',
    // component: Home,
	component: {render: (e) => e("router-view")},//加上这句就正常切换路由，原因未知
    children: [
        {
            path: '/',
            component: () => import('@/views/index.vue')
        },
		{
		    path: '/asyncComponents',
		    component: () => import('@/views/asyncComponents/index.vue')//路由懒加载
		},
		{
		    path: '/directive',
		    component: () => import('@/views/directive/Throttle.vue')
		},
		{
		    path: '/dynamicComponents',
		    component: () => import('@/views/dynamicComponents/index.vue')
		},
		{
		    path: '/defineProperty',
		    component: () => import('@/views/defineProperty/index.vue')
		},
        {
            path: '/provideInject',
            component: () => import('@/views/provideInject/index.vue')
        },
        {
            path: '/bus',
            component: () => import('@/views/bus/index.vue')
        },
        {
            path: '/life',
            component: () => import('@/views/life/index.vue')
        },
        {
            path: '/mixinpage',
            component: () => import('@/views/mixinpage/index.vue')
        },
    ]
}]
 
const router = new Router({
    routes: constantRouterMap
})
 
export default router